#include <QCoreApplication>
#include <iostream>
using namespace std;

int main(int argc, char *argv[])
{
    QCoreApplication a(argc, argv);

    int A[10],N,VR=0,I;
    cout<<"Vvedite N=  ";
    cin>>N;
    cout<<"Vvedite massiv  ";

    for(I=0;I<=N-1;I++)
      cin>>A[I];

    for (I=N;I>0;I--)
    if(A[I]<A[I-1])
       {VR=A[I-1];A[I-1]=A[I];A[I]=VR;}

    cout <<"Result "<<"A= ";
    for (I=0;I<=N-1;I++)
    cout<<" "<<A[I];

    return a.exec();
}
